﻿using furion.blog.Application.Contracts;
using furion.blog.Domain.IRepositories;
using furion.blog.Domain.MySQL;
using furion.blog.Domain.Query.AreaCode;
using Furion.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace furion.blog.Application
{
    public class AreaCodeService : IAreaCodeService, ISingleton
    {
        private readonly IAreaCodeRepository _areaCodeRepository;
        public AreaCodeService(IAreaCodeRepository areaCodeRepository) {
            this._areaCodeRepository = areaCodeRepository;
        }


        /// <summary>
        /// 查询所有
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public async Task<List<AreaCode>> All(AreaCodeDetailQuery query) { 
           return await this._areaCodeRepository.All(query);
        }

    }
}
